/**
 *  判断该用户是否是管理员角色
 */
const ifAdmin = () => {
    const userInfo = JSON.parse(localStorage.getItem('userInfo'));
    let userRole = false;
    if (userInfo) {
        const { role } = userInfo;
        if (role === 0) {
            userRole = true;
        }
    }
    return userRole;
};

export default ifAdmin;